package com.czkt.controller;

import com.czkt.pojo.ClassifiedNavigation;
import com.czkt.service.ClassifiedNavigationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;

@RestController
@CrossOrigin
public class ClassifiedNavigationController {
    @Autowired
    ClassifiedNavigationService classifiedNavigation;
   @RequestMapping("/ClassifiedNavigation/list")
    public Object getClassifiedNavigationList(){
       List<ClassifiedNavigation> navigationList = classifiedNavigation.list();
       Map<String,Object> navigation = new HashMap<>();
       navigation.put("navigation",navigationList);



        return navigation;
    }
}
